//
//  DetailSelectedCell.m
//  CarStore
//
//  Created by 千锋 on 16/1/29.
//  Copyright (c) 2016年 1000phone. All rights reserved.
//

#import "DetailSelectedCell.h"
#import "DetailTVController.h"

@interface DetailSelectedCell ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tableViewHeight;
@property (nonatomic, strong) DetailTVController *tvc;
@end

@implementation DetailSelectedCell

- (void)awakeFromNib {
    // Initialization code
    _tvc = [[DetailTVController alloc]init];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)upAndDownBtnClicked:(UIButton *)sender {
    sender.selected = !sender.selected;
    if (sender.selected) {
        self.tableViewHeight.constant = 100;
        self.height += 100;
    }else{
        self.tableViewHeight.constant = 0;
        self.height -= 100;
    }
    
    [_tvc.tableView reloadData];

}

@end
